﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Nirvana
{
    public class VertexLists
    {
        private static List<UIVertex> vertexlist;
        public static List<UIVertex> Get()
        {
            if(vertexlist != null)
            {
                List<UIVertex> newList = vertexlist;//旧的给别人
                vertexlist = null; //清除,保证再次创建时，是新的list
                return newList;
            }
            return new List<UIVertex>();
        }

        public static void Set(List<UIVertex> _list)
        {
            if (vertexlist == null) //只保留一份旧的缓存
            {
                vertexlist = _list;
            }
        }

    }
}

